<?php
	xmlwriter_start_element($xml,"login");
		if ($sig && $name && $id) {
//			xmlwriter_write_element($xml,"status","1");
			xmlwriter_write_element($xml,"status",$profileinfo['status']);
      xmlwriter_write_element($xml,"lang",$profileinfo['lang']);
			xmlwriter_write_element($xml,"name"	,$name);
			xmlwriter_write_element($xml,"id"		,$id);
			xmlwriter_write_element($xml,"sig"		,$sig);
		}	else 
		if ($badpass) {
			xmlwriter_write_element($xml,"status","0");
		}
		xmlwriter_end_element($xml);
?>
